package com.zz.springboot.model;

import javax.persistence.*;

@Table(name = "sys_user_role")
public class SysUserRole {
    /**
     * 用户id，关联sys_user表中id
     */
    @Id
    @Column(name = "user_id")
    private Long userId;

    /**
     * 角色id，关联sys_role表中id
     */
    @Id
    @Column(name = "role_id")
    private Integer roleId;

    /**
     * 获取用户id，关联sys_user表中id
     *
     * @return user_id - 用户id，关联sys_user表中id
     */
    public Long getUserId() {
        return userId;
    }

    /**
     * 设置用户id，关联sys_user表中id
     *
     * @param userId 用户id，关联sys_user表中id
     */
    public void setUserId(Long userId) {
        this.userId = userId;
    }

    /**
     * 获取角色id，关联sys_role表中id
     *
     * @return role_id - 角色id，关联sys_role表中id
     */
    public Integer getRoleId() {
        return roleId;
    }

    /**
     * 设置角色id，关联sys_role表中id
     *
     * @param roleId 角色id，关联sys_role表中id
     */
    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }
}